package com.project.service.impl;

import com.project.bean.SellMonthBean;
import com.project.bean.SellPieBean;
import com.project.mapper.ISellMapper;
import com.project.service.ISellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.List;

@Service
@Transactional
public class SellServiceImpl implements ISellService {
    @Autowired
    private ISellMapper mapper;

    @Override
    public List<SellPieBean> findByClasz(LocalDate startDate, LocalDate endDate) {
        return mapper.findByClasz(startDate, endDate);
    }

    @Override
    public List<SellPieBean> findByBrandAndClasz(LocalDate startDate, LocalDate endDate) {
        return mapper.findByBrandAndClasz(startDate, endDate);
    }

    @Override
    public List<SellMonthBean> findByYear(String year) {
        return mapper.findByYear(year);
    }

    @Override
    public List<String> findAllYear() {
        return mapper.findAllYear();
    }
}
